<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>05_版心与居中测试</title>
    <style>
        body{
            margin: 0;
            padding: 0;
        }
        *{
            margin: 0;
            padding: 0;
        }
        .main{
            background-color: #1e87d3;
        }
        .center{
            background-color: #20d2c2;
            width: 1000px;
            margin: 0 auto;
        }
        .card{
            width:200px;
            height: 300px;
            border:2px solid #000;
            background-color: lightgreen;
            margin: 0 auto;
            text-align: center;
            line-height: 300px;
        }
    </style>
</head>
<body>
<!--最外层的功能块-->
    <div class="main">
<!--        版心：固定宽度切居中-->
        <div class="center">
<!--            在版心里主要展示的内容-->
            <div class="card">我的内容</div>
            <div class="card">我是内容</div>
            <div class="card">我是内容</div>

        </div>
    </div>
</body>
</html>